home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 7: Sunsite
/
Linux Cubed Series 7 - Sunsite Vol 1.iso
/
system
/
admin
/
squota-0.02
/
Squota.tar
/
Squota
/
Squota
< prev
next >
Wrap
Text File
|
1996-05-13
|
1KB
|
37 lines
#!/bin/bash
# Squota - Screwed Quota Copyright (c) 1996 Gary Barrueto
##############################################################################
# Squota - This scripts kepts track of current users list..
##############################################################################
# Load variables - Read the /var/adm/Squota/quotavars to find out $VARIBLES
##############################################################################
. /var/adm/Squota/quotavars
##############################################################################
# WHAT THIS NEEDS, make the next line so it check users via /etc/passwd
##############################################################################
# get list of personal home dirs
# get rid of "lost+found" dir if it exists
# get rid of quota files...
##############################################################################
"ls" $WHATDIR | grep -v found | grep -v quota > /var/adm/Squota/quota.users
#######
# USER LIST just got created
# NOW its time to find how much, in Kilobytes, is stored currently in
# the users home.
#######
while test $PULENGTH != $EMPTY
do
EMPTY=`expr $EMPTY + 1`
UHOME=`head -$EMPTY $HQ/quota.users | tail -1`
# Start Logging
FSUSAGE=`eval du -s ~$UHOME | cut -f1`
echo $FSUSAGE >> $HQ/$UHOME.$MON
done